The present invention relates to a database managing system for making the same contents between parties which are ready to communicate, and particularly to a database managing system capable of reducing the amount of data transmitted or processed during a synchronous process.
Conventionally, information processing devices have been in wide use, and it is not rare in recent years for one individual to own a plurality of information processing devices, for example, such as a high-performance information processing device like a desk-top personal computer and a portable information processing device like a portable information terminal. When personal information, for example, such as schedules and address book are to be managed by these plurality of information processing devices, there is a need to maintain the same contents of data in any of databases provided in these information processing devices. Thus, in the case of managing, for example, personal information between a personal computer and a portable information terminal, a master database is managed by the personal computer and the data of the master database are copied to the database (portable database) of the portable information processing device, thus carrying the personal information.
In this manner, when managing the same data between a plurality of database managing devices, when the data are changed in one database managing device, it is required to update the database of all the other database managing devices. Here, if each database managing device is in communications all the time, the change in data is immediately reflected in each one of these devices when the updated database managing device informs the other database managing devices that the data have been changed. However, it is not always the case that each database managing device is in communications all the time with the other devices, for example, as in the case where the database managing device is a portable information terminal. In such a case, a change in data in one device is not reflected in the databases of the other database managing devices at the time when the change is made. Thus, in order to maintain the same database, it is required to carry out a process for making the same contents of database between parties at the time when communications are made between the database managing devices; namely, a synchronous process is required.
In the case of the above example, when data are changed in the portable information terminal, a synchronous process is carried out at the time when the portable information terminal is brought back to home or office, in which the data become the same between the portable database of the portable information terminal and the master database of the computer.
As an example of a conventional synchronous process, upload and download are known. Specifically, when data are changed in the personal computer, the contents of the master database are copied to the portable information terminal (download). On the other hand, when data are changed in the portable information terminal, the contents of the portable database are copied to the personal computer (upload).
Another example is a synchronous process employing a sum of sets. In this synchronous process, the contents of the both databases are compared at the time when communications are made between the two database managing devices, and a sum of sets, which contains all the information added to each database is created as a new database. Thereafter, the database thus created is stored the both database managing devices.
For example, when the both databases initially contain data xe2x80x9cAxe2x80x9d, and data xe2x80x9cBxe2x80x9d is added to one database managing device X, and data xe2x80x9cCxe2x80x9d is added to the other database managing device Y, the database managing device X sends its contents xe2x80x9cA+Bxe2x80x9d to the database managing device Y. The database managing device Y creates a sum of sets xe2x80x9cA+B+Cxe2x80x9d of the data xe2x80x9cA+Bxe2x80x9d received and its contents xe2x80x9cA+Cxe2x80x9d and stores the sum of sets as a database. The database managing device Y then sends the contents of the database xe2x80x9cA+B+Cxe2x80x9d back to the database managing device X. As a result, the contents of the database of the database managing device X are updated to xe2x80x9cA+B+Cxe2x80x9d, which are the same as that of the database managing device Y.
However, the conventional database managing device carrying out the described synchronous process has a problem that the data amount (communications volume) transmitted between the database managing devices in the synchronous process and the data amount computed in each database managing device are extremely large.
Specifically, in download and upload, all the contents of one of the databases are transmitted to the other database managing device regardless of the number of data updated. For example, in the case of a database having the data of 1000 items, the data of all the 1000 items are sent even when only one item is changed. As a result, the communications volume transmitted between the database managing devices is increased. Further, in the database managing device on the receiving side, the contents of the database are replaced with the database on the sending side, and thus a change in data on the receiving side is lost.
Also, in the synchronous process employing a sum of sets, in order to create a sum of sets, a database of one party is sent to the other database, and the sum of sets created is sent back as a new database. Thus, in this synchronous process, all the contents of the database are required to be sent back and forth between the database managing devices, and this further increases the communications volume in the synchronous process.
Further, in the case where the data are deleted only in one of the devices, the data remain in the other device. Thus, the data are included again in a new database and are not deleted. As a result, the memory space required for storing the database is increased, and the communications volume in the synchronous process is further increased.
In order to solve these problems, another example of the synchronous process is disclosed, for example, in Japanese Unexamined Patent Publication No. 6693/1997 (Tokukaihei 9-6693), in which update information indicative of a change or no change in data is given to all the data contained in the database. Specifically, each database managing device stores, per each data stored in the database, ID information for identifying the data and update information indicative of no change/correction/addition/deletion, and when the data are changed, the update information corresponding to the data is updated. Also, in the synchronous process, one database managing device informs the other database managing device the ID information and update information of all data. The database managing device on the receiving side searches through its database data corresponding to the data of the sending side based on the ID information received so as to compare the update information of the both sides. When a change is made only on one side, unchanged data are replaced with the data changed. When there is a change on the both sides, the data of one party are added to the database of the other party, and vice versa. With this arrangement, in the case where there is no change of data in any of the database managing devices, sending of such data can be omitted, thus reducing the communications volume in the synchronous process.
Even so, with the above arrangement, when correction of data is made on the both sides, the data corrected in one device are added to the other database, and vice versa, and the number of data contained in the database is increased. As a result, the memory space required for storing the database is increased, resulting in an increase in communications volume. Further, in order to suppress an increase in the number of data, it is required to delete unnecessary data after the synchronous process. However, this operation is troublesome because it is required to extract data to which correction was made in each party and compare the data of the both parties thus extracted, and the data to be deleted need to be specified. Further, this operation is usually made on one database managing device, and for this reason there is a need to reflect deletion of data in the other database managing device, and as a result the communications volume between the database managing devices are further increased.
Furthermore, in the case where whether to carry out the synchronous process is set in the database unit, it is also required to carry out the synchronous process with respect to data which do not require the synchronous process, or create a new database composed only by data which require the synchronous process. Also, in the case where whether to carry out the synchronous process is instructed per data, the process becomes very troublesome.
Furthermore, it is required to transmit ID information and update information with respect to the entire database. Also, when correction is made on the both sides, there is a need to add the data corrected in one device to the other database, and vice versa. Thus, in effect, the communications volume in the synchronous process is not actually reduced.
A first object of the present invention is to provide a database managing device which is capable of carrying out a synchronous process with a small effort and a small amount of communications data without resulting in an increase in size of a database even when plural data corresponding to each other are independently updated.
A second object of the present invention is to provide a database managing device in which a memory space required for storing the presence or absence of data change is small and the amount of data transmitted and processed in the synchronous process can be further reduced.
A third object of the present invention is to provide a database managing device which is capable of carrying out the synchronous process with a small amount of communications data without resulting in an increase in size of a database even when plural data corresponding to each other are independently updated, and which is also capable of operating the synchronous process, and sharing setting and sharing release before and after the synchronous process, respectively, with a small effort.
A database managing device of the present invention is for constituting a database system which includes a plurality of database managing devices and a synchronous process section for making a coincidence of corresponding data between databases respectively stored in the plurality of database managing devices which are ready to communicate, and in order to achieve the first object, the database managing device includes: at least one database; a state information storing section for storing state information indicative of a change in data which occurs in a non-synchronous period between a previous synchronous process and a next synchronous process, the state information storing section storing the state information per data corresponding to data of a database of another party; a collision detecting section for detecting in a synchronous process whether data changed in a pair of the corresponding data are plural based on state information of each data of the pair; and a priority side deciding section for deciding, when data changed are plural, which of the data should be given a priority before transmitting all contents of the plural data changed so that data contents on a non-priority side are replaced with data contents on a priority side by the synchronous process section.
With this arrangement, when a collision of data occurs, data to be given a priority is decided before transmitting the entire contents of the data, and the entire contents of data are transmitted in one direction from a database managing device on a priority side to a database managing device on a non-priority side. Thus, compared with the case where the contents of data are replaced by deciding the priority side after transmitting the entire contents of data, the amount of data transmitted and processed between database managing devices can be reduced. Further, because the priority side is decided at the time of the data collision, the number of data contained in the database of each database managing device does not increase even when the data are updated in a plurality of database managing devices. As a result, the memory space required for storing the database and the amount of data transmitted and processed in the synchronous process can be reduced.
Also, a database managing device in accordance with another preferable embodiment of the present invention is for constituting the database system, and in order to achieve the second object, includes: at least one database; a sub set setting section for setting a sub set in the at least one database, the sub set being set as a sharing region with a database of another party; a state information storing section for storing state information with respect to data which had been contained in the sub set at least at a time when a previous synchronous process was finished, the state information including (a) update information indicative of whether the data had been updated in a non-synchronous period and (b) movement information indicative of whether the data had been moved in and out of the sub set in the non-synchronous period; and a state information update section for monitoring data whose corresponding state information is stored in the state information storing section so as to update respective state information of the data in the non-synchronous period.
Thus, it is possible to identify with certainty data which exist both in the previous synchronous process and the next synchronous process, and whose contents are not changed (updated) between the both processes, even with respect to data which were moved in and out of the sub set. As a result, the amount of data transmitted to the database managing device of another party and the amount of data processed in the synchronous process can be reduced.
Also, a database managing device in accordance with still another preferable embodiment of the present invention is for constituting the database system, and in order to achieve the second object, includes: at least one database; an order storing section for storing an order of data which are contained at least in a sharing region of the database managing device and for setting a same order of data with that of another party in a previous synchronous process; a corresponded order storing section for storing a corresponded order indicative a last position of the order in the previous synchronous process; and an order managing section for managing an order of data so that the corresponded order and an order before the corresponded order of the order stored in the order storing section are maintained in a non-synchronous period, and data newly contained in the sharing region in the non-synchronous period are placed after the corresponded order.
With this arrangement, each database managing device stores the correspondence as an order of data which are stored therein. Thus, compared with the case of storing the correspondence as correspond information indicative of the data of another party, the memory space required for storing the correspondence and the arithmetic volume in the synchronous process can be reduced, and it is also possible to reduce the amount of data transmitted and processed in the synchronous process.
A database managing device in accordance with yet another preferable embodiment of the present invention is for constituting the database system, and in order to achieve the third object of the present invention, includes: a plurality of priority side deciding sections for deciding a priority side when data changed in the corresponding data are plural in a non-synchronous period, and for instructing the synchronous process section to replace data contents on a non-priority side with data contents on a priority side; and a selecting section for selecting one of the plurality of priority side deciding sections to be used, the selecting section making the selection at the time of sharing setting for specifying before the synchronous process the sharing regions, which store corresponding data, between the databases.
With this arrangement, when a collision of data occurs, the contents of data on the non-priority side are replaced with the contents of data on the priority side. Therefore, the number of data in the database and the amount of data transmitted and processed in the synchronous process can be reduced, and it is also possible to reduce the steps of the operation compared with the conventional technique in which individual data are deleted after the synchronous process. Also, because the priority side deciding section is selected at the time of the sharing setting, each database managing device can refuse the use of an undesirable priority side deciding section, thus realizing a safer database system.
A database managing device in accordance with still another preferable embodiment of the present invention is for constituting the database system, and in order to achieve the third object, includes: at least one database; and a priority side deciding section for deciding, when data changed in the corresponding data are plural in a non-synchronous period, a priority side based on a database managing device which instructed a start of the synchronous process or sharing setting, and the priority side deciding section for instructing the synchronous process section to replace data contents on a non-priority side with data contents on a priority side.
With this arrangement, when a collision of data occurs, the contents of data on the non-priority side are replaced with the contents of data on the priority side, thus reducing the number of data in the database and the amount of data transmitted and processed in the synchronous process. Also, because the start of the synchronous process and specifying of sharing setting can be instructed by the same operation as specifying of the priority side, the steps in the operation can be further reduced.
For a fuller understanding of the nature and advantages of the invention, reference should be made to the ensuing detailed description taken in conjunction with the accompanying drawings.